package com.luncheng.mcp.admin;

import com.luncheng.mcp.core.load.McpConfigLoader;
import com.luncheng.mcp.core.model.McpClientConfig;
import com.luncheng.mcp.core.model.McpServerConfig;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class McpServerConfigLoader implements McpConfigLoader {

    @Override
    public List<McpClientConfig> loadClientConfig() {
//        Map<String, String> env = Map.of("AMAP_MAPS_API_KEY", "your-api-key");
//        McpClientConfig maps_client = McpClientConfig.builder()
//                .transportType(TransportTypeEnum.STDIO)
//                .name("maps_client")
//                .command("npx")
//                .stdioArgs(new String[]{"-y", "@amap/amap-maps-mcp-server"})
//                .env(env)
//                .requestTimeout(3600)
//                .build();
//
//        McpClientConfig calculator_client = McpClientConfig.builder()
//                .transportType(TransportTypeEnum.STDIO)
//                .name("calculator_client")
//                .command("uvx")
//                .stdioArgs(new String[]{"mcp-server-calculator"})
//                .requestTimeout(3600)
//                .build();
        return Collections.emptyList();
    }

    @Override
    public List<McpServerConfig> loadServerConfig() {
        //  创建一个McpServerConfig对象，用于配置MCP服务器
//        McpServerConfig my_server = McpServerConfig.builder()
//                .transportType(TransportTypeEnum.SSE)
//                .name("sys_server")
//                .sseEndpoint("/sse")
//                .messageEndpoint("/sse/message")
//                .clients(Stream.of("maps_client", "calculator_client").toList())
//                .build();
        return Collections.emptyList();
    }
}
